package com.von.util;

import java.time.DayOfWeek;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author xiaosai
 * @version 1.0
 * @date 2021/10/20 9:36:14
 * @describe 日期处理
 * @className
 */
public class DateUtils {
    public String getWeek(){
        LocalDateTime localDateTime = LocalDateTime.now();
        DayOfWeek dayOfWeek = localDateTime.getDayOfWeek();
        System.out.println(dayOfWeek.toString());
        return "";
    }

    public static void main(String[] args) {
        LocalDateTime localDateTime = LocalDateTime.parse("2021-10-25 12:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
        DayOfWeek dayOfWeek = localDateTime.getDayOfWeek();
        System.out.println(dayOfWeek.getValue());
    }

}
